#define _CRT_SECURE_NO_WARNINGS 1 
#include<iostream>

using namespace std;

int exchangeBits(int num) {
    return ((num & 0x55555555) << 1) | ((num & 0xaaaaaaaa) >> 1);
}
int main()
{
	cout << exchangeBits(2) << endl;
	return 0;
}